package com.javasm.mingming.common.config;

import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.OptimisticLockerInnerInterceptor;
import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author javasm
 * @version 0.1
 * @className MpConfig
 * @descriptioin:
 * @date 2025/1/2 9:49
 * @since jdk11
 */
//MybatisPlus配置类
@Configuration
@MapperScan("com.javasm.mingming.*.dao")
public class MpConfig {
    @Bean
    public MybatisPlusInterceptor mybatisPlusInterceptor(){
        //初始化,拦截器对象
        MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
        //插件对象
        return interceptor;
    }
}
